home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
tput.z
/
tput
Wrap
Text File
|
1998-10-20
|
16KB
|
267 lines
ttttppppuuuutttt((((1111)))) ttttppppuuuutttt((((1111))))
NNNNAAAAMMMMEEEE
_tttt_pppp_uuuu_tttt - initialize a terminal or query terminfo database
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
_tttt_pppp_uuuu_tttt [_----_TTTT_t_y_p_e] _c_a_p_n_a_m_e [_p_a_r_m_s ... ]
_tttt_pppp_uuuu_tttt [_----_TTTT_t_y_p_e] _iiii_nnnn_iiii_tttt
_tttt_pppp_uuuu_tttt [_----_TTTT_t_y_p_e] _rrrr_eeee_ssss_eeee_tttt
_tttt_pppp_uuuu_tttt [_----_TTTT_t_y_p_e] _llll_oooo_nnnn_gggg_nnnn_aaaa_mmmm_eeee
_tttt_pppp_uuuu_tttt _----_SSSS _<<<<_<<<<
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_tttt_pppp_uuuu_tttt uses the _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database to make the values of terminal-dependent
capabilities and information available to the shell (see _ssss_hhhh(1)), to
initialize or reset the terminal, or return the long name of the
requested terminal type. _tttt_pppp_uuuu_tttt outputs a string if the attribute
(_c_a_pability _n_a_m_e) is of type string, or an integer if the attribute is of
type integer. If the attribute is of type boolean, _tttt_pppp_uuuu_tttt simply sets the
exit code (_0000 for TRUE if the terminal has the capability, _1111 for FALSE if
it does not), and produces no output. Before using a value returned on
standard output, the user should test the exit code [_$$$$_????, see _ssss_hhhh(1)] to be
sure it is _0000. (See the EXIT CODES and DIAGNOSTICS sections.) For a
complete list of capabilities and the _c_a_p_n_a_m_e associated with each, see
_tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4).
_----_TTTT_t_y_p_e indicates the _t_y_p_e of terminal. Normally this option is
unnecessary, because the default is taken from the environment
variable _TTTT_EEEE_RRRR_MMMM. If _----_TTTT is specified, then the shell variables
_LLLL_IIII_NNNN_EEEE_SSSS and _CCCC_OOOO_LLLL_UUUU_MMMM_NNNN_SSSS and the layer size [see _llll_aaaa_yyyy_eeee_rrrr_ssss(1)] will not
be referenced.
_c_a_p_n_a_m_e indicates the attribute from the _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database.
_p_a_r_m_s If the attribute is a string that takes parameters, the
arguments _p_a_r_m_s will be instantiated into the string. An all
numeric argument will be passed to the attribute as a number.
_----_SSSS allows more than one capability per invocation of _tttt_pppp_uuuu_tttt. The
capabilities must be passed to _tttt_pppp_uuuu_tttt from the standard input
instead of from the command line (see example). Only one
_c_a_p_n_a_m_e is allowed per line. The _----_SSSS option changes the
meaning of the _0000 and _1111 boolean and string exit codes (see the
EXIT CODES section).
_iiii_nnnn_iiii_tttt If the _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database is present and an entry for the
user's terminal exists (see _----_TTTT_t_y_p_e, above), the following will
occur: (1) if present, the terminal's initialization strings
will be output (_iiii_ssss_1111, _iiii_ssss_2222, _iiii_ssss_3333, _iiii_ffff, _iiii_pppp_rrrr_oooo_gggg), (2) any delays
(e.g., newline) specified in the entry will be set in the tty
driver, (3) tabs expansion will be turned on or off according
to the specification in the entry, and (4) if tabs are not
PPPPaaaaggggeeee 1111
ttttppppuuuutttt((((1111)))) ttttppppuuuutttt((((1111))))
expanded, standard tabs will be set (every 8 spaces). If an
entry does not contain the information needed for any of the
four above activities, that activity will silently be skipped.
_rrrr_eeee_ssss_eeee_tttt Instead of putting out initialization strings, the terminal's
reset strings will be output if present (_rrrr_ssss_1111, _rrrr_ssss_2222, _rrrr_ssss_3333, _rrrr_ffff).
If the reset strings are not present, but initialization
strings are, the initialization strings will be output.
Otherwise, _rrrr_eeee_ssss_eeee_tttt acts identically to _iiii_nnnn_iiii_tttt.
_llll_oooo_nnnn_gggg_nnnn_aaaa_mmmm_eeee If the _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database is present and an entry for the
user's terminal exists (see _----_TTTT_t_y_p_e above), then the long name
of the terminal will be put out. The long name is the last
name in the first line of the terminal's description in the
_tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database [see _tttt_eeee_rrrr_mmmm(5)].
IIIInnnntttteeeerrrrnnnnaaaattttiiiioooonnnnaaaallll FFFFuuuunnnnccccttttiiiioooonnnnssss
_c_a_p_n_a_m_e_s for international functionality can also be specified.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
_tttt_pppp_uuuu_tttt _iiii_nnnn_iiii_tttt Initialize the terminal according to the type of
terminal in the environmental variable _TTTT_EEEE_RRRR_MMMM. This
command should be included in everyone's .profile after
the environmental variable _TTTT_EEEE_RRRR_MMMM has been exported, as
illustrated on the _pppp_rrrr_oooo_ffff_iiii_llll_eeee(4) manual page.
_tttt_pppp_uuuu_tttt _----_TTTT_5555_6666_2222_0000 _rrrr_eeee_ssss_eeee_tttt Reset an AT&T 5620 terminal, overriding the type of
terminal in the environmental variable _TTTT_EEEE_RRRR_MMMM.
_tttt_pppp_uuuu_tttt _cccc_uuuu_pppp _0000 _0000 Send the sequence to move the cursor to row _0000, column _0000
(the upper left corner of the screen, usually known as
the "home" cursor position).
_tttt_pppp_uuuu_tttt _cccc_llll_eeee_aaaa_rrrr Echo the clear-screen sequence for the current
terminal.
_tttt_pppp_uuuu_tttt _cccc_oooo_llll_ssss Print the number of columns for the current terminal.
_tttt_pppp_uuuu_tttt _----_TTTT_4444_5555_0000 _cccc_oooo_llll_ssss Print the number of columns for the 450 terminal.
_bbbb_oooo_llll_dddd_====_````_tttt_pppp_uuuu_tttt _ssss_mmmm_ssss_oooo_````
_oooo_ffff_ffff_bbbb_oooo_llll_dddd_====_````_tttt_pppp_uuuu_tttt _rrrr_mmmm_ssss_oooo_````
Set the shell variables _bbbb_oooo_llll_dddd, to begin stand-out mode
sequence, and _oooo_ffff_ffff_bbbb_oooo_llll_dddd, to end standout mode sequence,
for the current terminal. This might be followed by a
prompt:
_eeee_cccc_hhhh_oooo _""""_$$$$_{{{{_bbbb_oooo_llll_dddd_}}}}_PPPP_llll_eeee_aaaa_ssss_eeee _tttt_yyyy_pppp_eeee _iiii_nnnn _yyyy_oooo_uuuu_rrrr _nnnn_aaaa_mmmm_eeee_:::: _$$$$_{{{{_oooo_ffff_ffff_bbbb_oooo_llll_dddd_}}}}_\\\\_cccc_""""
_tttt_pppp_uuuu_tttt _hhhh_cccc Set exit code to indicate if the current terminal is a
hardcopy terminal.
PPPPaaaaggggeeee 2222
ttttppppuuuutttt((((1111)))) ttttppppuuuutttt((((1111))))
_tttt_pppp_uuuu_tttt _cccc_uuuu_pppp _2222_3333 _4444 Send the sequence to move the cursor to row 23, column
4.
_tttt_pppp_uuuu_tttt _llll_oooo_nnnn_gggg_nnnn_aaaa_mmmm_eeee Print the long name from the _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database for the
type of terminal specified in the environmental
variable _TTTT_EEEE_RRRR_MMMM.
_tttt_pppp_uuuu_tttt _----_SSSS _<<<<_<<<<_!!!!
_>>>> _cccc_llll_eeee_aaaa_rrrr
_>>>> _cccc_uuuu_pppp _1111_0000 _1111_0000
_>>>> _bbbb_oooo_llll_dddd
_>>>> _!!!!
This example shows tput processing several capabilities
in one invocation. This example clears the screen,
moves the cursor to position 10, 10 and turns on bold
(extra bright) mode. The list is terminated by an
exclamation mark (_!!!!) on a line by itself.
FFFFIIIILLLLEEEESSSS
_////_uuuu_ssss_rrrr_////_ssss_hhhh_aaaa_rrrr_eeee_////_llll_iiii_bbbb_////_tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo_////_????_////_****
compiled terminal description database
_////_uuuu_ssss_rrrr_////_iiii_nnnn_cccc_llll_uuuu_dddd_eeee_////_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh
_cccc_uuuu_rrrr_ssss_eeee_ssss(3X) header file
_////_uuuu_ssss_rrrr_////_iiii_nnnn_cccc_llll_uuuu_dddd_eeee_////_tttt_eeee_rrrr_mmmm_...._hhhh _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo header file
_////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_tttt_aaaa_bbbb_ssss_eeee_tttt_////_**** tab settings for some terminals, in a format
appropriate to be output to the terminal (escape
sequences that set margins and tabs); for more
information, see the "Tabs and Initialization"
section of _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4)
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_cccc_llll_eeee_aaaa_rrrr(1), _ssss_tttt_tttt_yyyy(1), _tttt_aaaa_bbbb_ssss(1)
_pppp_rrrr_oooo_ffff_iiii_llll_eeee(4), _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4)
EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
If _c_a_p_n_a_m_e is of type boolean, a value of _0000 is set for TRUE and _1111 for
FALSE unless the _----_SSSS option is used.
If _c_a_p_n_a_m_e is of type string, a value of _0000 is set if the _c_a_p_n_a_m_e is
defined for this terminal _t_y_p_e (the value of _c_a_p_n_a_m_e is returned on
standard output); a value of _1111 is set if _c_a_p_n_a_m_e is not defined for this
terminal _t_y_p_e (a null value is returned on standard output).
If _c_a_p_n_a_m_e is of type boolean or string and the _----_SSSS option is used, a
value of _0000 is returned to indicate that all lines were successful. No
indication of which line failed can be given so exit code _1111 will never
appear. Exit codes _2222, _3333, and _4444 retain their usual interpretation.
If _c_a_p_n_a_m_e is of type integer, a value of _0000 is always set, whether or not
_c_a_p_n_a_m_e is defined for this terminal _t_y_p_e. To determine if _c_a_p_n_a_m_e is
defined for this terminal _t_y_p_e, the user must test the value of standard
output. A value of _----_1111 means that _c_a_p_n_a_m_e is not defined for this
terminal _t_y_p_e.
Any other exit code indicates an error; see the DIAGNOSTICS section.
PPPPaaaaggggeeee 3333
ttttppppuuuutttt((((1111)))) ttttppppuuuutttt((((1111))))
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
_tttt_pppp_uuuu_tttt prints the following error messages and sets the corresponding exit
codes.
exit
code error message
_0000 -1 (_c_a_p_n_a_m_e is a numeric variable that is not specified in the
_tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo(4) database for this terminal type, e.g.
_tttt_pppp_uuuu_tttt _----_TTTT_4444_5555_0000 _llll_iiii_nnnn_eeee_ssss and _tttt_pppp_uuuu_tttt _----_TTTT_2222_6666_2222_1111 _xxxx_mmmm_cccc)
_1111 no error message is printed, see the EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS section.
_2222 usage error
_3333 unknown terminal _t_y_p_e or no _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo database
_4444 unknown _tttt_eeee_rrrr_mmmm_iiii_nnnn_ffff_oooo capability _c_a_p_n_a_m_e
PPPPaaaaggggeeee 4444